home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / ieee_class.z / ieee_class
Encoding:
Text File  |  2002-10-03  |  2.4 KB  |  72 lines

  1. IEEE_CLASS(3I)                                        Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      IIEEEEEE__CCLLAASSSS - Returns the class to which _x belongs
  6.  
  7. SSYYNNOOPPSSIISS
  8.      IIEEEEEE__CCLLAASSSS (([XX==]_x))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS/mk, IRIX systems, CRAY T90 systems that support IEEE
  12.      floating-point arithmetic
  13.  
  14.      CF90, MIPSpro 7 Fortran 90
  15.  
  16. SSTTAANNDDAARRDDSS
  17.      Fortran extension
  18.  
  19.      IEEE Standard for Binary Floating-point Arithmetic
  20.  
  21. DDEESSCCRRIIPPTTIIOONN
  22.      A floating-point number can be classified several ways, such as a
  23.      quiet NaN, a signaling NaN, -0, +inf, etc.  The IIEEEEEE__CCLLAASSSS intrinsic
  24.      function returns a value that indicates the class to which _x belongs.
  25.  
  26.      This function accepts the following argument:
  27.  
  28.      _x         Must be of type real.
  29.  
  30.      IIEEEEEE__CCLLAASSSS is an elemental function.  The name of this intrinsic
  31.      cannot be passed as an argument.
  32.  
  33. NNOOTTEESS
  34.      The IEEE intrinsic procedures use the named constants contained in a
  35.      system module, so you must include the following statement in your
  36.      program:
  37.  
  38.           USE FTN_IEEE_DEFINITIONS
  39.  
  40. RREETTUURRNN VVAALLUUEESS
  41.      The result type and type parameter is default integer.  If _x is an
  42.      array, the result is an array of the same shape as _x.
  43.  
  44.      The value returned has a value represented by one of the following
  45.      named constants:
  46.  
  47.           IEEE_CLASS_SIGNALING_NAN
  48.           IEEE_CLASS_QUIET_NAN
  49.           IEEE_CLASS_NEG_INFINITY
  50.           IEEE_CLASS_NEG_NORM_NONZERO
  51.           IEEE_CLASS_NEG_DENORM
  52.           IEEE_CLASS_NEG_ZERO
  53.           IEEE_CLASS_POS_ZERO
  54.           IEEE_CLASS_POS_DENORM
  55.           IEEE_CLASS_POS_NORM_NONZERO
  56.           IEEE_CLASS_POS_INFINITY
  57.  
  58. EEXXAAMMPPLLEESS
  59.           REAL   x
  60.           ...                       ! Compute X.
  61.           SELECT CASE (IEEE_CLASS(x))
  62.             CASE IEEE_CLASS_SIGNALING_NAN
  63.               ...                   ! Do something.
  64.             CASE IEEE_CLASS_QUIET_NAN
  65.               ...                   ! Do something else.
  66.             ...                     ! Other cases.
  67.           END SELECT
  68.  
  69. SSEEEE AALLSSOO
  70.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  71.      man page.
  72.